def shi():
    print('静夜思---李白')
    print('床前明月光， 疑是地上霜')
    print('举头望明月， 低头思故乡')


shi()

print('--------------------------------')


def add():
    a, b = 6, 7
    s = a * b
    print('a和b的积为：', s)
    return a + b


c = add()
print(c)

print('--------------------------------')


def add(a, b):
    print(a + b)


add(1, 3)

c = 7
d = 9
add(c, d)

add(4 * 5, 9 % 3)

e = 0
add(8, e * 4 + 3)

print('--------------------------------')


def sc(a, b, c):
    print('张三的成绩为：', a)
    print('李四的成绩为：', b)
    print('王五的成绩为：', c)


sc(30, 52, 98)

sc(b=52, c=98, a=30)

print('--------------------------------')


def reg(name, age, sex='女'):
    print('姓名：{} 年龄：{} 性别：{}'.format(name, age, sex))


reg('小丽', 20)
reg('小张', 21, '男')
def fav(*fr):
    print('我喜欢的水果有：')
    for i in fr:
        print(i)


fav('苹果')
fav('苹果', '香蕉', '芒果')
fav('苹果', '西瓜', '橙子', '榴莲', '草莓')

print('-----------------------------------------')


def show(a, b, *l):
    print(a)
    print(b)
    print(l)


show(1, 2, 3, 4, 5, 6)

print('-----------------------------------------')


def rectangle():
    a = int(input('请输入矩形的长:'))
    b = int(input('请输入矩形的宽:'))
    s = a * b
    c = 2 * (a + b)
    print('该矩形的面积为：', s)
    print('该矩形的周长为：', c)


rectangle()

print('-----------------------------------------')


def re(a, b, c, d):
    return a + b, c * d, a - c


ss = re(1, 2, 3, 4)
print(ss)

print('-----------------------------------------')


def fu():
    a = 20
    return a


a = 1
print(a)
c = fu()
print(c)
